From: Keir Fraser Date: Tue, 4 May 2010 11:33:14 +0000 (+0100) Subject: p2m_alloc_table: use p2m_alloc_ptp X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12275 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=9b07822c1a8b18a75bdacc9c8bb3667cd994b329;p=xen.git p2m_alloc_table: use p2m_alloc_ptp Signed-off-by: Christoph Egger --- diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 916fdc2de8..df7d803811 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1814,22 +1814,19 @@ int p2m_alloc_table(struct domain *d, p2m->alloc_page = alloc_page; p2m->free_page = free_page; - p2m_top = p2m->alloc_page(d); - if ( p2m_top == NULL ) - { - p2m_unlock(p2m); - return -ENOMEM; - } - page_list_add_tail(p2m_top, &p2m->pages); - - p2m_top->count_info = 1; - p2m_top->u.inuse.type_info = + p2m_top = p2m_alloc_ptp(d, #if CONFIG_PAGING_LEVELS == 4 PGT_l4_page_table #else PGT_l3_page_table #endif - | 1 | PGT_validated; + ); + + if ( p2m_top == NULL ) + { + p2m_unlock(p2m); + return -ENOMEM; + } d->arch.phys_table = pagetable_from_mfn(page_to_mfn(p2m_top));